package com.ht.demo.service.mapper.system;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ht.demo.common.pojo.qto.system.FilterUrlConfigQTO;
import com.ht.demo.dao.dao.system.FilterUrlConfigDao;
import com.ht.demo.dao.domain.system.FilterUrlConfigDO;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author hdengxian
 * @Date 2023/3/28 10:13
 */
@Component
public class FilterUrlConfigMapper extends ServiceImpl<FilterUrlConfigDao, FilterUrlConfigDO> {
    @Resource
    private FilterUrlConfigDao filterUrlConfigDao;

    public List<FilterUrlConfigDO> findAll() {
        LambdaQueryWrapper<FilterUrlConfigDO> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(FilterUrlConfigDO::getEnableStatus, 0);
        wrapper.eq(FilterUrlConfigDO::getDeleted, 0);
        return filterUrlConfigDao.selectList(wrapper);
    }

    public Integer findForPageCount(FilterUrlConfigQTO qto) {
        return filterUrlConfigDao.findForPageCount(qto);
    }

    public List<FilterUrlConfigDO> findForPage(FilterUrlConfigQTO qto) {
        return filterUrlConfigDao.findForPage(qto);
    }

}
